package rjeutsky.validators.interfaces;

public interface Validator<T> {
	/**
	 * validates item
	 * @param item to validate
	 * @return validation result (true = ready to save to db)
	 */
	public boolean validate(T item);
	
	/**
	 * return validation error text if validation was unsuccessful
	 * result is undefined if validation was ok or was not called
	 * @return
	 */
	public String getValidationErrorMessage();
}
